package com.fbty.mt.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesUtil {
	private static String formEmail;
	private static String pwd;
	private static String toEmail;
	private PropertiesUtil() {
		  Properties prop = new Properties();   
		  InputStream in = Object.class.getResourceAsStream("/conf/email.properties");   
		  try {
			prop.load(in);
			formEmail = prop.getProperty("formEmail");
			pwd = prop.getProperty("pwd");
			toEmail = prop.getProperty("toEmail");
			System.out.println(toEmail);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public static String getFormEmail() {
		return formEmail;
	}
	public static String getPwd() {
		return pwd;
	}
	public static String getToEmail() {
		return toEmail;
	}
	
	public static void main(String[] args) throws IOException {
		  Properties prop = new Properties();   
		  InputStream in = Object.class.getResourceAsStream("/conf/email.properties");   
		  prop.load(in);
		  System.out.println(prop.getProperty("pwd"));
	}
}
